load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "copytrace",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "dependencies_override": {
            "dependencies": {"sapling-manifest": {"features": ["for-tests"]}},
            "dev-dependencies": {"sapling-manifest-tree": {"features": ["for-tests"]}},
        },
        "lib": {"name": "copytrace"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-copytrace",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    crate_root = "src/lib.rs",
    test_deps = [
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing-test",
        "//eden/scm/lib/manifest-tree:manifest-tree",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytecount",
        "fbsource//third-party/rust:lru-cache",
        "fbsource//third-party/rust:parking_lot",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tracing",
        "//eden/scm/lib/async-runtime:async-runtime",
        "//eden/scm/lib/config/model:configmodel",
        "//eden/scm/lib/dag:dag",
        "//eden/scm/lib/hg-metrics:hg-metrics",
        "//eden/scm/lib/manifest:manifest",
        "//eden/scm/lib/manifest-tree:manifest-tree",
        "//eden/scm/lib/pathhistory:pathhistory",
        "//eden/scm/lib/pathmatcher:pathmatcher",
        "//eden/scm/lib/storemodel:storemodel",
        "//eden/scm/lib/types:types",
        "//eden/scm/lib/xdiff:xdiff",
    ],
)
